import request from '@/utils/request'
// 获取用户详细信息
export function getInfo() {
    return request({
        url: '/api/user/info',
        method: 'get'
    })
}

export function getRouters(){
    return request({
        url: '/getRouters',
        method: 'get'
    })
}

export function listUser(query) {
    return request({
        url: '/api/user/list',
        method: 'get',
        params: query
    })
}


export function insertUser(data) {
    return request({
        url: '/api/user',
        method: 'post',
        data: data
    })
}

export function getUser(userId) {
    return request({
        url: '/api/user/' + userId,
        method: 'get'
    })
}

export function updateUser(data) {
    return request({
        url: '/api/user',
        method: 'put',
        data: data
    })
}

export function deleteUser(userIds) {
    return request({
        url: '/api/user/'+userIds,
        method: 'delete',
    })
}